
using UnityEngine;
using System;
using System.Text;
//using RabbitMQ.Client;
//using RabbitMQ.Client.Events;
public class ReceiveRabbitMQ : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
    //    var factory = new ConnectionFactory() { HostName = "localhost" };
    //    using (var connection = factory.CreateConnection())
    //    using (var channel = connection.CreateModel())
    //    {
    //        channel.QueueDeclare(queue: "hello",
    //            durable: false,
    //            exclusive: false,
    //            autoDelete: false,
    //            arguments: null);

    //        var consumer = new EventingBasicConsumer(channel);
    //        consumer.Received += (model, ea) =>
    //        {
    //            var body = ea.Body.ToArray();
    //            var message = Encoding.UTF8.GetString(body);
    //            Debug.Log($" [x] Received {message}");
    //        };
    //        channel.BasicConsume(queue: "hello",
    //            true,
    //            consumer: consumer);

    //        Debug.Log(" Press [enter] to exit.");
    //    }
    }

}
